home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16426 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news.sprintlink.net!datalytics!usenet
  2. From: Rob Stewart <stew@datalytics.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Is this a memory leak?
  5. Date: Wed, 10 Apr 1996 16:42:44 -0400
  6. Organization: Datalytics, Inc
  7. Message-ID: <316C1D44.3815@datalytics.com>
  8. References: <4jv214$gv7@insosf1.netins.net> <4k114a$m5d@linet06.li.net> <4k30g4$sdo@werple.net.au> <316ABE12.1915@delta.com>
  9. NNTP-Posting-Host: 204.62.224.71
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (WinNT; I)
  14.  
  15. Sean Palmer wrote:
  16. > > Also, many prominent people involved in C++, among them Bjarne Stroustrup,
  17. > > the language's designer, recommend using 0, not NULL, as a null pointer.
  18. > > One of the arguments against NULL is that it is not as portable as 0; some
  19. > > people might spell it 'Null', or 'null'.
  20. > Sounds like an argument against case sensitivity to me....
  21.  
  22. The problem is that NULL can, quite legally, be defined in many 
  23. ways.  The two standard ways provided by ANSI C are (void*)0 and 
  24. 0 (see comp.lang.c FAQ 5.4).  NULL is not portable because of 
  25. the various (even just these two) definitions, not because of 
  26. case sensitivity.  Using zero works all the time; it's portable.
  27.  
  28. -- 
  29. Robert Stewart        | My opinions are usually my own.
  30. Datalytics, Inc.    | stew@datalytics.com
  31.